package com.fly;

import java.io.IOException;

import org.apache.commons.lang3.SystemUtils;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class TotpApplication implements CommandLineRunner
{
    public static void main(String[] args)
        throws Exception
    {
        SpringApplication.run(TotpApplication.class, args);
    }
    
    @Override
    public void run(String... args)
    {
        if (SystemUtils.IS_OS_WINDOWS)
        {
            try
            {
                Runtime.getRuntime().exec("cmd /c start http://127.0.0.1:8080/00fly/");
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
        }
    }
}
